go/types.object.typ (field)

162 uses

	go/types (current package)
		alias.go#L150: 	if obj.typ == nil {
		alias.go#L151: 		obj.typ = a
		assignments.go#L122: 	if x.mode == invalid || !isValid(x.typ) || !isValid(lhs.typ) {
		assignments.go#L123: 		if lhs.typ == nil {
		assignments.go#L124: 			lhs.typ = Typ[Invalid]
		assignments.go#L132: 		if lhs.typ == nil {
		assignments.go#L133: 			lhs.typ = Typ[Invalid]
		assignments.go#L140: 	if lhs.typ == nil {
		assignments.go#L141: 		lhs.typ = x.typ
		assignments.go#L144: 	check.assignment(x, lhs.typ, "constant declaration")
		assignments.go#L157: 	if x.mode == invalid || !isValid(x.typ) || !isValid(lhs.typ) {
		assignments.go#L158: 		if lhs.typ == nil {
		assignments.go#L159: 			lhs.typ = Typ[Invalid]
		assignments.go#L166: 	if lhs.typ == nil {
		assignments.go#L172: 				lhs.typ = Typ[Invalid]
		assignments.go#L178: 		lhs.typ = typ
		assignments.go#L181: 	check.assignment(x, lhs.typ, context)
		assignments.go#L292: 		res = append(res, x.typ)
		assignments.go#L412: 			check.expr(newTarget(lhs.typ, desc), &x, orig_rhs[i])
		assignments.go#L432: 			if v.typ == nil {
		assignments.go#L433: 				v.typ = Typ[Invalid]
		assignments.go#L464: 		if v.typ == nil {
		assignments.go#L465: 			v.typ = Typ[Invalid]
		builtins.go#L946: 			if hasVarSize(f.typ, seen) {
		call.go#L318: 		x.typ = sig.results.vars[0].typ // unpack tuple
		call.go#L411: 					resList[i] = &operand{mode: value, expr: e, typ: v.typ}
		call.go#L498: 				typ := last.typ.(*Slice).elem
		call.go#L656: 			check.assignment(a, sigParams.vars[i].typ, context)
		call.go#L742: 				x.typ = exp.typ
		call.go#L746: 				x.typ = exp.typ
		call.go#L749: 				x.typ = exp.typ
		call.go#L755: 				x.typ = exp.typ
		call.go#L758: 					x.typ = x.typ.(*Signature).results.vars[0].typ
		call.go#L762: 				x.typ = exp.typ
		call.go#L777: 		if def != nil && def.typ == x.typ {
		call.go#L856: 		sig := m.typ.(*Signature)
		call.go#L903: 			x.typ = obj.typ
		call.go#L958: 			sig := *obj.typ.(*Signature)
		check.go#L228: 	alias.typ = Typ[Invalid]
		check.go#L235: 	alias.typ = typ
		decl.go#L128: 			if !check.validCycle(obj) || obj.typ == nil {
		decl.go#L129: 				obj.typ = Typ[Invalid]
		decl.go#L133: 			if !check.validCycle(obj) || obj.typ == nil {
		decl.go#L134: 				obj.typ = Typ[Invalid]
		decl.go#L144: 				obj.typ = Typ[Invalid]
		decl.go#L230: 			if check.inTParamList && isGeneric(obj.typ) {
		decl.go#L433: 	assert(obj.typ == nil)
		decl.go#L455: 			obj.typ = Typ[Invalid]
		decl.go#L458: 		obj.typ = t
		decl.go#L479: 	assert(obj.typ == nil)
		decl.go#L483: 		obj.typ = check.varType(typ)
		decl.go#L498: 			obj.typ = Typ[Invalid]
		decl.go#L506: 		check.expr(newTarget(obj.typ, obj.name), &x, init)
		decl.go#L524: 			lhs.typ = obj.typ
		decl.go#L542: 	assert(obj.typ == nil)
		decl.go#L549: 		if t := asNamed(obj.typ); t != nil { // type may be invalid
		decl.go#L764: 	base := asNamed(obj.typ) // shouldn't fail but be conservative
		decl.go#L835: 	assert(obj.typ == nil)
		decl.go#L841: 	obj.typ = sig // guard against cycles
		decl.go#L941: 							assert(obj.typ != nil)
		expr.go#L1253: 			list[i] = &operand{mode: value, expr: e, typ: v.typ}
		gcsizes.go#L44: 			if a := s.Alignof(f.typ); a > max {
		gcsizes.go#L89: 		a := s.Alignof(f.typ)
		gcsizes.go#L92: 		if d := s.Sizeof(f.typ); d >= 0 && offs >= 0 {
		gcsizes.go#L143: 		size := s.Sizeof(t.fields[n-1].typ)
		infer.go#L176: 		if isParameterized(tparams, par.typ) || isParameterized(tparams, arg.typ) {
		infer.go#L180: 				if !u.unify(par.typ, arg.typ, assign) {
		infer.go#L181: 					errorf(par.typ, arg.typ, arg)
		infer.go#L184: 			} else if _, ok := par.typ.(*TypeParam); ok && !arg.isNil() {
		infer.go#L335: 		tpar := params.At(index).typ.(*TypeParam) // is type parameter (no alias) by construction of untyped
		infer.go#L611: 			if w.isParameterized(m.typ) {
		infer.go#L644: 		if w.isParameterized(v.typ) {
		infer.go#L764: 			w.typ(m.typ)
		infer.go#L794: 		w.typ(v.typ)
		interface.go#L61: 		if sig := m.typ.(*Signature); sig.recv == nil {
		interface.go#L203: 			if named := asNamed(def.typ); named != nil {
		literals.go#L194: 				etyp := fld.typ
		literals.go#L221: 				etyp := fld.typ
		lookup.go#L172: 						assert(f.typ != nil)
		lookup.go#L191: 						typ, isPtr := deref(f.typ)
		lookup.go#L202: 					assert(m.typ != nil)
		lookup.go#L371: 			if !equivalent(f.typ, m.typ) {
		lookup.go#L415: 			if !equivalent(f.typ, m.typ) {
		lookup.go#L505: 			if f.embedded && (!isValid(f.typ) || hasInvalidEmbeddedFields(f.typ, seen)) {
		lookup.go#L538: 	w.signature(f.typ.(*Signature))
		methodset.go#L149: 						typ, isPtr := deref(f.typ)
		named.go#L245: 	if obj.typ == nil {
		named.go#L246: 		obj.typ = typ
		named.go#L276: 	obj.typ = typ
		named.go#L406: 	origSig := origm.typ.(*Signature)
		object.go#L106: 	typ       Type
		object.go#L158: func (obj *object) Type() Type { return obj.typ }
		object.go#L174: func (obj *object) setType(typ Type)          { obj.typ = typ }
		object.go#L307: 	switch t := obj.typ.(type) {
		object.go#L412: 	if obj.typ != nil {
		object.go#L413: 		return obj.typ.(*Signature) // normal case
		object.go#L437: func (obj *Func) Scope() *Scope { return obj.typ.(*Signature).scope }
		object.go#L465: 	if sig, _ := obj.typ.(*Signature); sig != nil && sig.recv != nil {
		object.go#L466: 		_, isPtr := deref(sig.recv.typ)
		object.go#L489: 	return &Label{object{pos: pos, pkg: pkg, name: name, typ: Typ[Invalid], color_: black}, false}
		object.go#L500: 	return &Builtin{object{name: predeclaredFuncs[id].name, typ: Typ[Invalid], color_: black}, id}
		object.go#L645: 	if f.typ != nil {
		object.go#L646: 		sig := f.typ.(*Signature)
		predicates.go#L180: 			if !comparableType(f.typ, dynamic, seen, nil) {
		predicates.go#L182: 					reportf("struct containing %s cannot be compared", f.typ)
		predicates.go#L302: 						!c.identical(f.typ, g.typ, p) {
		predicates.go#L324: 						if !c.identical(v.typ, w.typ, p) {
		predicates.go#L450: 					if f.Id() != g.Id() || !c.identical(f.typ, g.typ, q) {
		resolver.go#L639: 		if obj, _ := obj.(*TypeName); obj != nil && obj.typ != nil {
		selection.go#L100: 		sig := *s.obj.(*Func).typ.(*Signature)
		selection.go#L102: 		recv.typ = s.recv
		selection.go#L111: 		sig := *s.obj.(*Func).typ.(*Signature)
		selection.go#L114: 		arg0.typ = s.recv
		signature.go#L57: 		core := coreString(params.At(n - 1).typ)
		signature.go#L407: 		last.typ = &Slice{elem: last.typ}
		signature.go#L408: 		check.recordTypeAndValue(list.List[len(list.List)-1].Type, typexpr, last.typ, nil)
		signature.go#L427: 	rtyp, _ := deref(recv.typ)
		signature.go#L461: 		check.errorf(pos, InvalidRecv, "invalid receiver type %s", recv.typ)
		sizes.go#L82: 			if a := s.Alignof(f.typ); a > max {
		sizes.go#L139: 		a := s.Alignof(f.typ)
		sizes.go#L142: 		if d := s.Sizeof(f.typ); d >= 0 && offs >= 0 {
		sizes.go#L216: 		size := s.Sizeof(t.fields[n-1].typ)
		sizes.go#L322: 		T = s.fields[i].typ
		stmt.go#L951: 			assert(obj.typ == nil)
		stmt.go#L957: 				obj.typ = Typ[Invalid]
		stmt.go#L972: 			assert(obj.typ != nil)
		subst.go#L291: 		if typ := subst.typ(v.typ); typ != v.typ {
		subst.go#L300: 	copy.typ = typ
		subst.go#L334: 		if typ := subst.typ(f.typ); typ != f.typ {
		subst.go#L343: 	copy.typ = typ
		typeparam.go#L52: 	if obj.typ == nil {
		typeparam.go#L53: 		obj.typ = typ
		typeset.go#L243: 					if pos.IsValid() && !check.allowVersion(go1_14) || !Identical(m.typ, other.Type()) {
		typestring.go#L171: 			w.typ(f.typ)
		typestring.go#L250: 				w.signature(m.typ.(*Signature))
		typestring.go#L350: 			w.typ(Unalias(t.obj.typ))
		typestring.go#L370: 		w.signature(m.typ.(*Signature))
		typestring.go#L453: 			typ := v.typ
		typestring.go#L499: 		w.typ(sig.results.vars[0].typ)
		typexpr.go#L420: 		switch t := def.typ.(type) {
		unify.go#L522: 				if ym := ymap[xm.Id()]; ym == nil || !u.nify(xm.typ, ym.typ, exact, p) {
		unify.go#L543: 				if ym, _ := obj.(*Func); ym == nil || !u.nify(xm.typ, ym.typ, exact, p) {
		unify.go#L616: 						!u.nify(f.typ, g.typ, emode, p) {
		unify.go#L638: 						if !u.nify(v.typ, w.typ, mode, p) {
		unify.go#L713: 					if f.Id() != g.Id() || !u.nify(f.typ, g.typ, exact, q) {
		universe.go#L169: 	def(&Nil{object{name: "nil", typ: Typ[UntypedNil], color_: black}})
		validtype.go#L57: 			if !check.validType0(pos, f.typ, nest, path) {